Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts the addition of all functionality required for the addition of WRatio which includes:
token_ratio
partial_ratio
partial_token_ratio
wratio
Additionally, lots of test cases were added. (Many of which don't pass yet (Sometimes the tests themself make wrong assumptions, but they are a good base for further debugging.)
This PR should not be merged yet.
One major issue is that, because the ratio function returns in the range from 0-1 and the other newly implemented ratio functions return between 0-100, like in the C++ implementation, hence the score_cutoff parameter doesn't work properly yet.
However, with score_cutoff set to 0, the functions seem to return the same values as in the C++ reference implementation.
I have opened this PR because I'm not sure if I will have time to further work on this - I think the current, very sloppy state of the implementation in this PR is already sufficient for my use case for now.